﻿@model HeaderLinksModel
@using Nop.Web.Models.Common;
<div class="navbar container">
    <div class="navbar-header">
        <div class="icon-item"><i title="skirts" class="icon iconfont">&#xf008b;</i></div>
        <div class="icon-item"><i title="dresses" class="icon iconfont">&#xf0097;</i></div>
        <div class="icon-item"> <i title="suspenders" class="icon iconfont">&#xf009b;</i></div>
        <div class="icon-item"> <i title="children" class="icon iconfont">&#xf01db;</i></div>
        <div class="icon-item"> <i title="maternity dress" class="icon iconfont">&#xf01e8;</i></div>
        <div class="icon-item"> <i title="t-shirt" class="icon iconfont">&#xf0075;</i></div>
        <div class="icon-item"> <i title="pants" class="icon iconfont">&#xf009e;</i></div>
        <div class="icon-item"> <i title="high-heeled shoes" class="icon iconfont">&#xf009a;</i></div>
        <div class="icon-item"> <i title="handbags" class="icon iconfont">&#xf009c;</i></div>
    </div>
    <div class="navbar-links">
        <ul id="j-navbar-links" class="nav navbar-nav navbar-right">
            @Html.Widget("header_links_before")
            @if (Model.AllowPrivateMessages)
            {
                <li>
                    <a href="@Url.RouteUrl("PrivateMessages", new { tab = "" })" class="ico-inbox">
                        <span class="inbox-label">@T("PrivateMessages.Inbox")</span>
                        <span class="inbox-unread">@Model.UnreadPrivateMessages</span>
                    </a>
                </li>
            }
            @if (Model.ShoppingCartEnabled)
            {
                <li id="minicart" class="dropdown-header-link">
                    <a href="@Url.RouteUrl("ShoppingCart")" class="dropdown-toggle ico-cart">
                        <span class="cart-label">@T("ShoppingCart")</span>
                        <span class="cart-qty">@T("ShoppingCart.HeaderQuantity", Model.ShoppingCartItems)</span>
                        <span class="caret"></span>
                    </a>
                    <div class="dropdown-menu">
                        @Html.Action("FlyoutShoppingCart", "ShoppingCart")
                    </div>
                </li>
            }
            @if (Model.WishlistEnabled)
            {
                <li id="miniwishlist">
                    <a href="@Url.RouteUrl("Wishlist")" class="ico-wishlist">
                        <span class="wishlist-label">@T("Wishlist")</span>
                        <span class="wishlist-qty">@T("Wishlist.HeaderQuantity", Model.WishlistItems)</span>
                    </a>
                </li>
            }
            @if (Model.IsAuthenticated)
            {
                <li><a href="@Url.RouteUrl("CustomerInfo")" class="account">@Model.CustomerEmailUsername</a></li>
                <li><a href="@Url.RouteUrl("Logout")" class="ico-logout">@T("Account.Logout")</a></li>
            }
            else
            {
                <li><a href="@Url.RouteUrl("Register")" class="ico-register">@T("Account.Register")</a></li>
                <li><a href="@Url.RouteUrl("Login")" class="ico-login">@T("Account.Login")</a></li>
            }
            @*@Html.Action("TaxTypeSelector", "Common")
                @Html.Action("CurrencySelector", "Common")
                @Html.Action("LanguageSelector", "Common")*@
            @Html.Widget("header_selectors")
            @Html.Widget("header_links_after")
        </ul>
        @if (Model.AllowPrivateMessages && !string.IsNullOrEmpty(Model.AlertMessage))
        {
            //new private message notification
            <script type="text/javascript">
                seajs.use(["common/1.0.0/index"], function (app) {
                    app(function () {
                        app.displayPopupNotification('@Html.Raw(HttpUtility.JavaScriptStringEncode(Model.AlertMessage))', 'success', false);
                    });
                });
            </script>
        }
        @if (Model.ShoppingCartEnabled)
        {
            <script type="text/javascript">
                seajs.use(["common/1.0.0/index", "dropdownbutton/1.0.0/index"], function (app, dropdown) {
                    app(function () {
                        var opts = {
                            topNav: '#j-navbar-links', btnSelector: '.dropdown-toggle', listSelector: '.dropdown-menu', offset: { y: 24, right_x: 0, left_x: -2 }
                        };
                        dropdown.dropDownButton(".dropdown-header-link", opts);
                    });
                });
            </script>
        }
    </div>
</div>